CREATE TABLE [dbo].[TDMODI_DOIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_CORR_MODI] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDMODI_DO__NU_SE__4850AF91] DEFAULT ((0)),
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDMODI_DO__NU_PR__4944D3CA] DEFAULT ((0)),
[FE_MODI] [dbo].[TD_DT_001] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDMODI_DO__CO_US__4A38F803] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDMODI_DO__FE_US__4B2D1C3C] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDMODI_DO__CO_US__4C214075] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDMODI_DO__FE_US__4D1564AE] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDMODI_DOIN] ADD CONSTRAINT [PK__TDMODI_D__94F64BE677017CD9] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_CORR_MODI], [NU_SECU], [NU_PROC], [FE_MODI]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDMODI_DOIN] ADD CONSTRAINT [FK__TDMODI_DOIN__567F9EAE] FOREIGN KEY ([CO_EMPR], [NU_CORR_MODI], [NU_SECU], [FE_MODI]) REFERENCES [dbo].[TDMODI_DOCU] ([CO_EMPR], [NU_CORR_MODI], [NU_SECU], [FE_MODI])
GO
